package charatr04.example;
import sun.applet.Main;
//定义接口Animal
interface Animal11 {
    int ID = 1;
    String NAME = "牧羊犬";
    void shout ();  // 定义抽象方法shout
    static int getID (){
        return Animal11.ID;
    }
    public void info();
}
interface Action{
    public void eat();
}
//定义Dog类实现Animal接口和Action接口
class Dog11 implements Animal11,Action{
    //重写Action接口中的抽象方法eat()
    public void eat(){
        System.out.println("喜欢吃骨头");
    }
    //重写Animal接口中的抽象方法shout()
    public void shout(){
        System.out.println("汪汪……");
    }
    public void info() {
        System.out.println("名称："+NAME);
    }
}
public class Example11 {
    public static void main(String[] args) {
        System.out.println("编号"+Animal11.getID());
        Dog11 dog = new Dog11();
        dog.info();
        dog.shout();
        dog.eat();
    }
}